package ipaintplugin.editors;

import java.util.Stack;

public class Caretaker {
	private Stack<Memento> pastStates = new Stack<Memento>();
	private Stack<Memento> futureStates = new Stack<Memento>();

	public void pushPastMemento(Memento m) {
		pastStates.push(m);
	}

	public Memento popPastMemento() {
		return pastStates.pop();
	}

	public int getPastSize() {
		return pastStates.size();
	}

	public void pushFutureMemento(Memento m) {
		futureStates.push(m);
	}

	public Memento popFutureMemento() {
		return futureStates.pop();
	}

	public int getFutureSize() {
		return futureStates.size();
	}
}